#ifndef __PLAYER_MGR_H__
#define __PLAYER_MGR_H__

#include "utils/singleton.h"
#include "./playerthread.h"

#define MAX_PLAYER_COUNT 4

class PlayerMgr : public Singleton<PlayerMgr>
{
public:
	PlayerMgr();
	~PlayerMgr();

	void Start();
	void Stop();

	int AddPlayer(string strName, 
				  Point startPos, 
				  float startAngle, 
				  Point hpPos,
				  float z,
				  Color color);

	vector<Player*>& GetPlayers();

private:
	void OnPlayerThreadEnd(BaseThread* pThread);

private:
	static PlayerThread* s_pThreads[];
	static vector<Player*> s_playerList;
	static int s_count;
};

#endif